﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Tours.aspx.cs" Inherits="TourAgency.Admin.Tours" %>

<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="sm" runat="server">
    </asp:ScriptManager>
    <asp:Label runat="server" ID="labelPageInfo">
        Here is a list of all offers from the tour agency</asp:Label>
    <asp:UpdatePanel ID="leftUpdatePanel" runat="server">
        <ContentTemplate>
            <asp:Panel ID="leftPanel" runat="server">
                <h2>
                    <asp:HyperLink ID="HyperLink1" runat="server" Text="Create" NavigateUrl="~/Admin/Create/NewTour.aspx" />
                    new tour...</h2>
                <br />
                <asp:GridView ID="gridViewTourOffers" runat="server" AutoGenerateColumns="False"
                    CellPadding="4" ForeColor="#333333" GridLines="None">
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Destination
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# GetDestinationByID("DestinationID") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Start Date
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# GetDateOnly("StartDate")%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                End Date
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# GetDateOnly("EndDate")%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Price per person
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# Eval("Price") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:Button ID="detailsButton" runat="server" Text="View Details" CommandArgument='<%# Eval("ID") %>'
                                    OnCommand="ShowDetails" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:Button ID="editButton" runat="server" Text="Edit" CommandArgument='<%# Eval("ID") %>'
                                    OnCommand="ShowDetails" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:Button ID="deletebutton" runat="server" Text="Delete" CommandArgument='<%# Eval("ID") %>'
                                    OnCommand="ShowDetails" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EditRowStyle BackColor="#999999" />
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="rightUpdatePanel" runat="server">
        <ContentTemplate>
            <asp:Panel ID="rightPanel" runat="server">
                <h3>
                    Tour Details</h3>
                <hr />
                <asp:ListView ID="listViewDetails" runat="server">
                    <LayoutTemplate>
                        <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <div id="detailsViewItemTemplate">
                            <h4>
                                <%# GetDestinationByID("DestinationID")%></h4>
                            Price:
                            <%# Eval("Price", "{0:c}") %><br />
                            Start Date:
                            <%# GetDateOnly("StartDate") %><br />
                            End Date:
                            <%# GetDateOnly("EndDate") %><br />
                            <div id="description">
                                Description:
                                <%# EncodeEval("Description") %><br />
                            </div>
                            Transport:
                            <%# GetTransportnByID("TransportID")%><br />
                            Board:
                            <%# GetBoardByID("BoardID")%><br />
                        </div>
                    </ItemTemplate>
                </asp:ListView>
                <div id="hotelFacs">
                    <asp:ListView ID="listViewHotelFacilities" runat="server">
                        <LayoutTemplate>
                            <div id="hotelFacilities">
                                <h4>
                                    Hotel Extras:</h4>
                                <ul>
                                    <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
                                </ul>
                            </div>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <li>
                                <%# EncodeEval("Name") %></li>
                        </ItemTemplate>
                    </asp:ListView>
                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
